import { ref } from 'vue';

const SYSTEM_INFO = uni.getSystemInfoSync();
let phone_Info = ref(SYSTEM_INFO);


export const phoneInfo = phone_Info;
// 安全底部
export const safeBottom = phoneInfo.value.safeAreaInsets.bottom
console.log('safeBottom',safeBottom);
export const safeTop = phoneInfo.value.safeAreaInsets.top
// console.log('SYSTEM_INFO: ' + JSON.stringify(phoneInfo.value));

//safeTop=时间栏高度 
const ButtonBounding = uni.getMenuButtonBoundingClientRect()
console.log('ButtonBounding',ButtonBounding);
const top = ButtonBounding.top
// 胶囊按钮的高度
export let capsuleButton = ref(ButtonBounding.height)

// 时间栏高度 
export let TimeBarHeight =  ref(phone_Info.value.statusBarHeight)
console.log('TimeBarHeight',TimeBarHeight.value);

//胶囊按钮的安全高度
export let capsuleHeight = ref(capsuleButton.value + (top - TimeBarHeight.value) * 2)
console.log('capsuleHeight',capsuleHeight.value);

// 整个导航栏高度
export let navbarHeight = ref(TimeBarHeight.value + capsuleHeight.value)
console.log('navbarHeight' + navbarHeight.value);